package com.yeziji.common.business.dataMessage.base;

import com.yeziji.common.CommonBusinessEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 数据消息通信 实体对象
 *
 * @author hwy
 * @since 2024/10/29 14:26
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DataMessage implements Serializable {
    private static final long serialVersionUID = -5492670775119204885L;

    /**
     * 这里一般指的是数据 id
     * {@link CommonBusinessEntity#getId()}
     */
    private Long id;

    /**
     * 云端数据标识
     */
    private String flag;

    /**
     * 客户端数据标识
     */
    private String clientId;

    /**
     * 操作类型(insert/update/delete)
     */
    private Integer operateType;

    /**
     * 操作云端的数据表
     */
    private String table;

    /**
     * 消费信息
     */
    private String message;

    /**
     * 消息相关数据
     */
    private String correlationData;

    /**
     * 异常消息
     */
    private String reason;
}